<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('用户行为记录列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>商户号：</label>
                                <input type="text" name="merno" th:value="${null!=merNo ? merNo:''}"/>
                            </li>
                            <li>
                                <label>手机号：</label>
                                <input type="text" name="phone"/>
                            </li>
                            <li>
                                <label style="width: 80px">客户端类型：</label>
                                <select name="type">
                                    <option value="">请选择</option>
                                    <option value="-1">暂时未定</option>
                                </select>
                            </li>

                            <li>
                                <label>APP类型：</label>
                                <select name="sysmark" th:with="type=${@dict.getType('app_type')}">
                                    <option value="">请选择</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>

                            <li class="select-time">
                                <label>添加日期：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginLocalDate]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endLocalDate]"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('merchantInfo:records:edit')}]];
        var removeFlag = [[${@permission.hasPermi('merchantInfo:records:remove')}]];
        var prefix = ctx + "merchantInfo/records";
        var appType = [[${@dict.getType('app_type')}]];

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "用户行为记录",
                clickToSelect:true,
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '主键id',
                    visible: false
                },
                    {
                        field: 'merno',
                        title: '商户号'
                    },
                    {
                        field: 'phone',
                        title: '手机号'
                    },
                {
                    field: 'type',
                    title: '客户端类型'
                },
                {
                    field: 'sysmark',
                    title: 'APP类型',
                    align: 'center',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(appType, value);
                    }
                },
                {
                    field: 'version',
                    title: '版本号'
                },
                {
                    field: 'channel',
                    title: '应用市场'
                },
                {
                    field: 'merareas',
                    title: '省市区'
                },
                {
                    field: 'merdetailedaddress',
                    title: '详细地址'
                },
                {
                    field: 'uuid',
                    title: '唯一标识'
                },
                {
                    field: 'content',
                    title: '请求接口内容'
                },
                {
                    field: 'localdate',
                    title: '操作日期'
                },
                {
                    field: 'localtime',
                    title: '操作时间'
                },]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>